package com.csist.service.po.studentRegistryModule.impl;

import com.csist.mapper.po.studentRegistryModule.BasicStudentInfoMapper;
import com.csist.pojo.po.studentRegistryModule.BasicStudentInfo;
import com.csist.service.po.studentRegistryModule.BasicStudentInfoService;
import com.csist.util.SqlSessionUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.Collections;
import java.util.List;

/**
 * @ClassName BasicStudentInfoServiceImpl
 * @Description 【自行描述】
 * @Author cn
 * @Date 2024/7/1 下午1:43
 * @Version 1.0
 */
public class BasicStudentInfoServiceImpl implements BasicStudentInfoService {
    private SqlSession sqlSession;
    private BasicStudentInfoMapper basicStudentInfoMapper;
    public BasicStudentInfoServiceImpl(){
        sqlSession = SqlSessionUtil.openSession();
        basicStudentInfoMapper = sqlSession.getMapper(BasicStudentInfoMapper.class);
    }
    @Override
    public List<BasicStudentInfo> findAll() {
        return Collections.emptyList();
    }

    @Override
    public List<BasicStudentInfo> searchBSIByColumn(BasicStudentInfo bsi) {
        List<BasicStudentInfo> list = basicStudentInfoMapper.searchBSIByColumn(bsi);
        if (list != null && list.size() > 0) {
            return list;
        }
        return null;
    }

    @Override
    public BasicStudentInfo getBSIById(int id) {
        return null;
    }

    @Override
    public int addBSI(BasicStudentInfo bsi) {
        return 0;
    }

    @Override
    public int updateBSI(BasicStudentInfo bsi) {
        return 0;
    }
}
